package com.example.phone.activity;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.Menu;

import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.BDNotifyListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.map.LocationData;
import com.baidu.mapapi.map.MKMapViewListener;
import com.baidu.mapapi.map.MapController;
import com.baidu.mapapi.map.MapPoi;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MyLocationOverlay;
import com.baidu.platform.comapi.basestruct.GeoPoint;
public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		//LocationClient mLocClient;
		//public LocationClient mLocationClient = null;
	
		// new InitTask().execute(1);
		// Timer timer = new Timer();
		// final Intent intent = new Intent(MainActivity.this,
		// FirstActivity.class);
		//
		// TimerTask task = new TimerTask() {
		// @Override
		// public void run() {
		// startActivity(intent); // 启动新的Activity
		// FirstActivity.this.finish();
		// }
		// };
		// timer.schedule(task, 1000 * 8); // 8秒后执行
		new Handler().postDelayed(new Runnable() {
			public void run() {
				Intent mainIntent = new Intent(MainActivity.this,
						TabHostActivity.class);

				MainActivity.this.startActivity(mainIntent);
				MainActivity.this.finish();
				// overridePendingTransition(android.R.anim.fade_in,
				// android.R.anim.fade_out);
			}
		}, 1000);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
